package org.zhouhe.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ArticleIndustry entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "article_industry", catalog = "zpd0t1_db")
public class ArticleIndustry implements java.io.Serializable {

	// Fields

	private static final long serialVersionUID = -5092495565546882946L;
	private Integer articleIndustryId;
	private Industry industry;
	private Article article;
	private Integer main;

	// Constructors

	/** default constructor */
	public ArticleIndustry() {
	}

	/** full constructor */
	public ArticleIndustry(Industry industry, Article article, Integer main) {
		this.industry = industry;
		this.article = article;
		this.main = main;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "article_industry_id", unique = true, nullable = false)
	public Integer getArticleIndustryId() {
		return this.articleIndustryId;
	}

	public void setArticleIndustryId(Integer articleIndustryId) {
		this.articleIndustryId = articleIndustryId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Industry_id")
	public Industry getIndustry() {
		return this.industry;
	}

	public void setIndustry(Industry industry) {
		this.industry = industry;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "article_id")
	public Article getArticle() {
		return this.article;
	}

	public void setArticle(Article article) {
		this.article = article;
	}

	@Column(name = "main")
	public Integer getMain() {
		return this.main;
	}

	public void setMain(Integer main) {
		this.main = main;
	}

}